export function sliceDate(arr, dateName) {
  arr.forEach(v => {
    v[dateName] = v[dateName].slice(0, 10)
  })
  return arr
}
// 验证是不是当月
export const whenMouth = (oldTime) => {
  let newTime = {}
  newTime.year = '' + new Date().getFullYear()
  newTime.month = '' + (new Date().getMonth()+1)
  if(newTime.month.length == 1){
    newTime.month = '0' + newTime.month
  }
  if(oldTime.year == newTime.year && oldTime.month == newTime.month ){
    return false
  }else{
    return true
  }
}